<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<title>Style size function tests</title>

<script type="text/javascript">

	var djConfig = {isDebug: true};

	//djConfig.debugAtAllCosts = true;

</script>
<script type="text/javascript" src="../../dojo.js"></script>
<script language="JavaScript" type="text/javascript">
	dojo.require("dojo.style");
	dojo.hostenv.writeIncludes();
</script>
<script>
var tests = [
	{ name: "outer width", func: dojo.style.getOuterWidth, expected: 110 },	
	{ name: "outer height", func: dojo.style.getOuterHeight, expected: 60 },	
	{ name: "inner width", func: dojo.style.getInnerWidth, expected: 100 },	
	{ name: "inner height", func: dojo.style.getInnerHeight, expected: 50 },	
	{ name: "content width", func: dojo.style.getContentWidth, expected: 80 },	
	{ name: "content height", func: dojo.style.getContentHeight, expected: 30 }
];

function onLoad(){
	var objNames = [ "mytable", "mydiv" ];
	for(var on=0; on<objNames.length; on++) {
		var objName = objNames[on];
		dojo.debug("---" + objName + "---");
		var obj = dojo.byId(objName);
		dojo.style.setOuterWidth(obj, 110);
		dojo.style.setOuterHeight(obj, 60);
		for(var i=0;i<tests.length;i++){
			var test=tests[i];
			var actual = test.func(obj);
			dojo.debug(test.name + ": actual="+ actual + ", expected=" + test.expected);
		}
	}
}
dojo.addOnLoad(onLoad);
</script>
</head>
<body>

<p>HTML before</p>
<p>HTML before</p>
<table id="mytable" style="margin: 5px 5px 5px 5px; padding: 7px 7px 7px 7px; border: 3px solid blue;">
<tr><td>table</td></tr>
</table>

<div id="mydiv" style="margin: 5px 5px 5px 5px; padding: 7px 7px 7px 7px; border: 3px solid blue;">
div
</div>
<p>HTML after</p>
<p>HTML after</p>

</body>
</html>
